import axios from "axios";
const httpInStance=axios.create({
    baseURL:"http://pcapi-xiaotuxian-front-devtest.itheima.net",
    timeout:5000,
})

//拦截器
// axios请求拦截
httpInStance.interceptors.request.use(config=>{
    return config
},e=>Promise.reject(e))

//axios响应拦截
httpInStance.interceptors.response.use(res=>res.data,e=>{
    return Promise.reject(e)
})

export default httpInStance